@import './vertex.scss';

@mixin resizebox($width: 10px, $height: 10px, $radius: 0, $bgcolor: #1890ff) {
  position: absolute;
  width: 100%;
  height: 100%;
  &.lt {
    right: 0;
    bottom: 0;
  }
  &.rt {
    left: 0;
    bottom: 0;
  }
  &.lb {
    top: 0;
    right: 0;
  }
  &.rb {
    top: 0;
    left: 0;
  }
  & > [resize] {
    display: inline-block;
    width: $width;
    height: $height;
    background-color: $bgcolor;
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: $radius;
  }
  & > [resize='lt'] {
    @include vertex(lt, true, false);
  }
  & > [resize='rt'] {
    @include vertex(rt, true, false);
  }
  & > [resize='lb'] {
    @include vertex(lb, true, false);
  }
  & > [resize='rb'] {
    @include vertex(rb, true, false);
  }
}
